﻿
    using Chain.BLL;
    using Chain.Model;
    using System;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;

    public partial class login : Page
    {


        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                if (base.Request.QueryString["code"] != null)
                {
                    Chain.Model.SysParameter modelSysParameter = new Chain.BLL.SysParameter().GetModel(1);
                    this.hidUrl.Value = string.Format("https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri=http://{1}/ReceptionPage/register.aspx&response_type=code&scope=snsapi_base&state=0#wechat_redirect", modelSysParameter.WeiXinAppID, modelSysParameter.SystemDomain);
                }
                else
                {
                    this.hidUrl.Value = "register.aspx";
                }
            }
        }
    }


